<template>
	<el-button type="primary" @click="open()">点击弹出二次确认弹窗</el-button>
</template>
<script setup lang="ts">
	import { ref, getCurrentInstance } from 'vue';
	const { proxy } = getCurrentInstance();
	const open = () => {
		proxy.$QConfirm({
			confirmProps: {
				title: '提交提示',
				content: '确定要删除吗',
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				width: 380,
				showClose: true,
				cancel: () => {
					console.log('删除');
				},
				confirm: () => {
					console.log('确定');
					return new Promise(resolve => {
						setTimeout(() => {
							resolve(true);
						}, 3000);
					});
				},
			},
		});
	};
</script>
